/*
 DeviceName
 Shows how to get the name and address of bluetooth
 
 GNU GPL
 Copyright (c) 2012 Marlon J. Manrique       
 http://www.marlonj.com 
 $Id$
*/

// Import the the bluetooth library  
import com.marlonj.processing.abluetooth.*;

// Object to control the bluetooth 
ABluetooth bluetooth; 

/**
 * Create the bluetooth library 
 */
void setup() {
  bluetooth = new ABluetooth(this);
}

/**
 * Draw the name and address of the bluetoot adapter
 */ 
void draw() {  
  // Clear the screen
  background(0);
  
  // Draw to time bigger the text 
  scale(2);
  
  // Get the name and address 
  String deviceName = bluetooth.deviceName();
  String deviceAddress = bluetooth.deviceAddress();
  
  // Draw the info in the screen 
  text("Bluetooth Name: " + deviceName,30,50);
  text("Bluetooth Address: "+ deviceAddress,30,70);
}
